<div id="title_bloc" class="app_contents">
    <h1>Liste des <strong>Médias</strong></h1>
</div>

<?php $this->config->includePartial( BackendModulesList::MAIN, 'flashes', array( 'flashes' => $flashes ) ) ;?>

<div id="table_header">
    <ul class="th">
        <li>LABEL</li>
        <li class="tab_actions">&nbsp;</li>
    </ul>
</div>

<?php if( count( $result ) ) : ?>
    <div id="table">
    <?php $i = 0; ?>
    <?php foreach( $result as $vo ) : ?>
        <?php if($vo instanceof MediaVO):?>
        <ul<?php if ( ! ($i%2) ) { echo ' class="alt"' ; } ?>>
            <li><?php echo $vo->label ; ?></li>
            <li class="tab_actions">
            <?php
                echo HtmlHelper::linkTo
                (
                    HtmlHelper::UIButton( "pencil" ),
                    UriHelper::get( BackendModulesList::MEDIA, BackendActionsList::EDIT, array( 'id' => $vo->id ) ),
                    array( 'title' => "Editer" )
                );

                echo HtmlHelper::linkTo
                (
                    HtmlHelper::UIButton( "closethick", "Supprimer" ),
                    UriHelper::get( BackendModulesList::MEDIA, BackendActionsList::DELETE, array( 'id' => $vo->id ) ),
                    array( 'title' => "Supprimer"),
                    'Êtes-vous sûr de vouloir supprimer ce role ?'
                );
            ?>
            </li>
        </ul>
        <?php $i ++;?>
        <?php endif?>
    <?php endforeach ; ?>
    </div>
<?php endif; ?>
<?php echo HtmlHelper::linkTo( HtmlHelper::UIButton( 'plusthick') . 'Ajouter un média', UriHelper::get( BackendModulesList::MEDIA, BackendActionsList::ADD ), array( 'title' => 'Ajouter un média') ); ?>